<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Location Service</title>
    <style>
        .body{background-color:#0f0}
        .title {
            font-size: 30px;
            color:red;
        }
    </style>
</head>
<body>
    <div class=".title">我的页面</div>
    <button onclick="getImage()">获取图片uri</button>
    <img id="MyImg" style="width:100px;height:100px">
    <div id="showImgUrl"></div>
</body>
<script>
    function getImage(){
        var url = window.swift.openPhoto()
    }
    function setImageUrl(url){
       document.querySelector("#MyImg").src = url
       document.querySelector("#showImgUrl").innerHTML = url
    }

</script>
</html>